<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="../node_modules/vue/dist/vue.js"></script>
</head>
<body>
        <div id="app">
            <mydiv></mydiv>
        </div>
    <template id="sss">
       <div>
           <table border="1" width="100%" style="color: aqua">
               <thead>
               <tr>
                   <th>id</th>
                   <th>名字</th>
                   <th>密码</th>
               </tr>
               </thead>
               <tbody>
               <tr>
                   <td v-text="user.id"></td>
                   <td v-text="user.username"></td>
                   <td v-text="user.password"></td>
               </tr>
               </tbody>
           </table>
       </div>
    </template>
</body>

    <script type="text/javascript">
        Vue.component("mydiv",{
            template:"#sss",data(){
                return {user:{id:17, username:"琴里", password:"2222" } }
            }
            })
        new Vue({
            el: "#app",
            data: {

            }
        })
    </script>
</html>